
import pygtk
pygtk.require('2.0')
import gtk # sets app name
import gnomekeyring


def run ():
    KEYRING_NAME = "from stow"
    #gnomekeyring.create_sync(KEYRING_NAME, None)
    print gnomekeyring.unlock_sync(KEYRING_NAME, "foo")

    item_name = "display name"
    print gnomekeyring.item_create_sync(KEYRING_NAME, gnomekeyring.ITEM_GENERIC_SECRET, item_name, {"a" : "1"}, "secret", True)

    print gnomekeyring.find_items_sync(KEYRING_NAME, {"a" : "1"})
 
if __name__ == '__main__':
    run()
